﻿using LinqToLfsWorld.Interface;
using System;
using LinqToLfsWorld.Attributes;
using System.Runtime.Serialization;

namespace LinqToLfsWorld
{
	/// <summary>
	/// An entry in the LFS hotlap chart.
	/// </summary>
	[Serializable]
	[DataContract]
	public class HotlapChartEntry : ILfsWorldEntity
	{
		/// <summary>
		/// Gets or sets the track ident. This property is queryable.
		/// </summary>
		/// <value>The track ident.</value>
		[PubstatQueryable(true)]
		[DataMember]
		public string TrackIdent { get; set; }

		/// <summary>
		/// Gets or sets the car. This property is queryable.
		/// </summary>
		/// <value>The car.</value>
		[PubstatQueryable(true)]
		[DataMember]
		public string Car { get; set; }

		/// <summary>
		/// Gets or sets the steering method.
		/// </summary>
		[PubstatQueryable(false)]
		[DataMember]
		public string SteeringMethod { get; set; }

		/// <summary>
		/// Gets or sets the id.
		/// </summary>
		/// <value>The id.</value>
		[DataMember]
		public int Id { get; set; }

		/// <summary>
		/// Gets or sets the  full name of the track from the <see cref="TrackIdent">TrackIdent</see>.
		/// </summary>
		[DataMember]
		public string TrackName { get;  set; }

		/// <summary>
		/// Gets or sets the first split time
		/// </summary>
		[DataMember]
		public TimeSpan Split1 { get; set; }

		/// <summary>
		/// Gets or sets the second split time
		/// </summary>
		[DataMember]
		public TimeSpan Split2 { get; set; }

		/// <summary>
		/// Gets or sets the third split time
		/// </summary>
		[DataMember]
		public TimeSpan Split3 { get; set; }

		/// <summary>
		/// Gets or sets the lap time.
		/// </summary>
		[DataMember]
		public TimeSpan LapTime { get; set; }

		/// <summary>
		/// Gets or sets the name of the racer.
		/// </summary>
		[DataMember]
		public string RacerName { get; set; }

		/// <summary>
		/// Gets or sets the hotlap flags.
		/// </summary>
		[DataMember]
		public HotlapFlags Flags { get; set; }
		
	}
}
